﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity
{
    [DataContract]
    [Serializable]
    public class MetaDataVersion
    {
        /// <summary>
        /// ID
        /// </summary>
        [DataMember]
        public string ID { get; set; }

        /// <summary>
        /// 元数据GUID
        /// </summary>
        [DataMember]
        public string MetadataID { get; set; }
        /// <summary>
        /// 元数据ID
        /// </summary>
        [DataMember]
        public string MetadataCode { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        [DataMember]
        public string Version { get; set; }

        /// <summary>
        /// VersionMask
        /// </summary>
        [DataMember]
        public decimal VersionMask { get; set; }

        //private string contentID;

        ///// <summary>
        ///// 元数据内容ID
        ///// </summary>
        //[DataMember]
        //public string ContentID
        //{
        //    get
        //    {
        //        if (Content != null)
        //            contentID = Content.MeteDataID;

        //        return contentID;
        //    }
        //    set
        //    {
        //        contentID = value;
        //    }
        //}

        /// <summary>
        /// 元数据内容
        /// </summary>
        [DataMember]
        public IMetaDataContent Content { get; set; }

        [DataMember]
        public string ContentJSON { get; set; }

        [DataMember]
        public string MetaDataJSON { get; set; }

        [DataMember]
        public string Terms { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DataMember]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [DataMember]
        public string Creator { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [DataMember]
        public DateTime LastModifyTime { get; set; }

        /// <summary>
        /// 最后修改者
        /// </summary>
        [DataMember]
        public string LastModifier { get; set; }

        /// <summary>
        /// 项目分支标识
        /// </summary>
        public string ProjectBranchID { get; set; }
    }
}
